/**
 * 添加客户追踪
 */
$("body").ready(function(){
$("#btnAddtrack").click( function(){
		//setNewtrack();
	});
});

function setNewtrack( b ){
		
	var myDate = new Date();
	
	var year = myDate.getFullYear();
	var month = myDate.getMonth()+1;
	var mydate  = myDate.getDate();
	var mytime = year+"-"+month+"-"+mydate;
	
	var h = "<table id='fri'>";
	h += "<tr class='fields'>";
	h += "<th colspan='2'>今日客户跟踪记录（"+mytime+"）</th>";
	h += "</tr>";
	h += "<tr class='even_row'>";
	h += "<th width='25%'>此次客户状态<p class='caption'>状态可多选，不选择代表“无变化”</p></th>";
	h += "<td width='75%' id='statelist' style='padding:25px'>" +
			"<label for='state_1' title='明确不参加'><input id='state_1' type='checkbox' value='qenzgu6wde3c'>不参加</label>" +
			"<label for='state_2' title='有较高意向和兴趣'><input id='state_2' type='checkbox' value='nhb8wyq1nda5'>高意向</label>" +
			"<label for='state_3' title='已经发送相关协议'><input id='state_3' type='checkbox' value='qyebkhp2x67y'>已发协议</label>" +
			"<label for='state_4' title='计划另行跟踪'><input id='state_4' type='checkbox' onclick='timeout()' value='138g5wfwm1mx'>计划跟踪</label>" +
			"<label for='state_5' title='已转交其它老师'><input id='state_5' type='checkbox' onclick='target()' value='o3dpi9gzuol4'>已转交</label>" +
			"<label for='state_6' title='已成功预约测评'><input id='state_6' type='checkbox' value='mldqhlrg1sad'>已预约</label>" +
			"<label for='state_7' title='已完成测评'><input id='state_7' type='checkbox' value='caoodurhkcl6'>已测评</label>" +
			"<label for='state_8' title='已缴费开始训练'><input id='state_8'type='checkbox'value='znouq0wygvbb'>已缴费</label>" +
			"<label for='state_9'title='已退费中止训练'><input id='state_9' type='checkbox' value='krm8s91foapx'>已退费</label>"+
			"<label for='state_11' title='预约成功的客户未出现'><input id='state_11' type='checkbox' value='n9fjwyx5w74g'>未出现</label>"+
			"<label for='state_12' title=''><input id='state_12' type='checkbox' value='n4f79h2giie6'>意向一般</label>"+
			"<label for='state_13' title=''><input id='state_13' type='checkbox' value='rym23z0aopkk'>一直关机</label>"+
			"<label for='state_14' title='无法接通'><input id='state_14' type='checkbox' value='pflp6f14pers'>无法接通</label>"+
			"<label for='state_15' title=''><input id='state_15' type='checkbox' value='ikslzv14e1dt'>接通挂断</label>"+
			"<label for='state_16' title=''><input id='state_16' type='checkbox' value='uj69ezpbh5a6'>无人接听</label>"+
			"<label for='state_17' title=''><input id='state_17' type='checkbox' value='x79wzgwvtlw4'>空号</label>"+
			"<label for='state_18' title=''><input id='state_18' type='checkbox' value='jvk1n2y542sw'>无意向</label>"+
			"<label for='state_19' title=''><input id='state_19' type='checkbox' value='27gflkc3y4j8'>正在通话中</label>"+
			"<label for='state_20' title=''><input id='state_20' type='checkbox' value='37nsij5vk6s9'>有意向</label>"+
			"<label for='state_21' title='不是当事人接电话，或者直接挂断'><input id='state_21' type='checkbox' value='w8j09zdfxhp1'>未通</label>"+
			"<label for='state_22' title='了解过，有印象，但不需要'><input id='state_22' type='checkbox' value='jezobexay0iq'>了解&amp;不需要</label>"+
			"<label for='state_23' title=''><input id='state_23' type='checkbox' value='t0aklt2bks96'>孩子不在重庆</label>"+
			"<label for='state_24' title=''><input id='state_24' type='checkbox' value='5cw0p5pk8brw'>暂时没空</label>"+
			"<label for='state_25' title=''><input id='state_25' type='checkbox' value='n0280meoxdhy'>停机</label></td>";
	h += "</tr>";
	   
	h +="<tr class='odd1_row' style='display:none;'>";
	h +="<th width='25%'>定时提醒</th>"; 
	h +="<td width='75%'><div id='jhtime' contenteditable='true'>";
	h +="<input type='text' name='pro_time' id='proTime' size='15' rel='DATE::Y-m-d'>";
	h +="<p class='caption'>需要计划在某日期跟踪时，设置“定时提醒”，当天会有消息提醒！</p></td>";
	h +="</tr>";
	h +="<tr class='odd2_row' style='display:none;' >";
	h +="<th width='25%' style='padding:15px 10px 15px 10px'>转交目标";
	h +="<p class='caption'>转交目标必须同样是咨询师</p>";
	h +="</th>";
	h +="<td width='75%'><div id='lodusername' contenteditable='true'>";
	h +="<p class='caption'>成功转交后，你将无法在对该客户进行维护和跟踪，且从你个人客户资源中去除。</p></td>";
	h +="</tr>"; 
	h +="<tr class='odd_row'>";
	h +="<th width='25%' style='padding: 15px 10px 15px 10px;'>跟踪情况";
	h +="<p class='caption'>客户咨询内容摘要，如“咨询问题”等</p>"
	h +="</th>";
	h +="<td width='75%'><div id='remark' contenteditable='true'>无</div></td>";
	h +="</tr>";
	h += "</table>";

	$( "#addtrack" ).append( h );
	
}